<template>
  <div class="goods">
    <goods-list-item v-for="(item, index) in goods" :key="index" :goods-item="item"></goods-list-item>
  </div>
</template>

<script>
  import GoodsListItem from './GoodsListItem'
  import GridView from 'components/common/gridView/GridView'

  export default{
  name: 'GoodsList',
  components: {
    GoodsListItem,
    GridView
  },
  props: {
    goods: {
      type: Array,
      default() {
        return []
      }
    }
  }
  }
</script>

<style scoped>
  .goods {
    display: flex;
    /* flex-wrap 弹性子项溢出部分会被放置到新的一行 */
    flex-wrap: wrap;
    /* justify-content 定义项目在主轴上的对齐方式 */
    justify-content: space-around;

    padding: 2px;
  }


</style>
